import sys
import json


sys.path.insert(0, './utilities')
# sys.path.insert(0, '/home/ubuntu/ADAS_PATH_MONITOR/utilities')

from check_tools import ping_check
from check_tools import GetCurTime


def main():

    with open('./config/network_check_parameter.json') as f:
        # with open('/home/ubuntu/ADAS_PATH_MONITOR/config/network_monitor_parameter.json') as f:
        data = json.load(f)

    customer_edges = data['customer_edge']

    print("check time is: ", GetCurTime())

    for i in range(0, len(customer_edges)):
        print(customer_edges[i][0])
        ping_check(customer_edges[i][1], 0)
        print("\n")

if __name__ == '__main__':
    main()
